package com.gujia.concurrent.countdownlatch;

import java.util.concurrent.CountDownLatch;

public class TestThread implements Runnable{

    private CountDownLatch latch;

    public TestThread(CountDownLatch latch) {
        this.latch = latch;
    }

    @Override
    public void run() {
        try {
            System.out.println("begin");

            this.latch.await();
            System.out.println("可以开始全面的测试");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
